********************DATA PREP********************
cd "C:\RCFS Data"
set more off

use "SIXout_p.dta", clear
append using "SIXout_v.dta"
append using "SIXout_l.dta"
append using "SIXout_i.dta"
append using "SIXout_d.dta"
append using "SIXout_c.dta"
append using "SIXout_p ffe.dta"
append using "SIXout_v ffe.dta"
append using "SIXout_l ffe.dta"
append using "SIXout_i ffe.dta"
append using "SIXout_d ffe.dta"
append using "SIXout_c ffe.dta"

gen sd2sd=abs(coeff*expvarsd/depvarsd)
gen sd2mean=abs(coeff*expvarsd/depvarmean)
gen iqr2sd=abs(coeff*(expvarp75-expvarp25)/depvarsd)
gen iqr2mean=abs(coeff*(expvarp75-expvarp25)/depvarmean)

replace sd2sd=0.201 if sd2sd>0.2
replace sd2mean=0.201 if sd2mean>0.2

replace iqr2sd=0.201 if iqr2sd>0.2
replace iqr2mean=0.201 if iqr2mean>0.2

hist sd2mean, percent width(.01) title("Panel A: Δy for a one-s.d. Δx") subtitle("Normally distributed explanatory variables") xtitle("Economic significance") addplot(hist sd2sd, percent width(.01) lcolor(black) fcolor(none)) legend(order(1 "Scaled by mean of y" 2 "Scaled by s.d. of y" ))

hist iqr2mean, percent width(.01) title("Panel B: Δy for a one-IQR Δx") subtitle("Normally distributed explanatory variables") xtitle("Economic significance") addplot(hist iqr2sd, percent width(.01) lcolor(black) fcolor(none)) legend(order(1 "Scaled by mean of y" 2 "Scaled by s.d. of y" ))
